<?php
	$mail             = new PHPMailer();
	
	$body             = eregi_replace("[\]",'',$body);
	
	$mail->IsSMTP();
	$mail->SMTPAuth   = true;                  // enable SMTP authentication
	$mail->SMTPSecure = "ssl";                 // sets the prefix to the server
	$mail->Host       = "smtp.gmail.com";      // sets GMAIL as the SMTP server
	$mail->Port       = 465;                   // set the SMTP port
	
	$mail->Username   = "smiles.studio.com@gmail.com";  // GMAIL username
	$mail->Password   = "sm!lesstud!0";            // GMAIL password
	
	$mail->From       = "smiles.studio.com@gmail.com";
	$mail->FromName   = 'SMILE\'S STUDIO Contact';
	$mail->Subject    = $_POST['subject']; //Message Subject
	$mail->AltBody    = $_POST['message']; //Text Body
	$mail->WordWrap   = 50; // set word wrap
	
	$mail->MsgHTML($body);
	
	$mail->AddReplyTo($_POST['email'],$_POST['name']);
	
	$mail->AddAddress("smiles.studio.com@gmail.com","SMILE'S STUDIO");
	
	$mail->IsHTML(true); // send as HTML
	
	if(!$mail->Send()) {
		$mailSentInfo = $error_msg;
	} else {
	  	$mailSentInfo = $ok_msg;
	}
?>